home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / gfx / show / MerlinGfx.lha / hrgtool.h < prev    next >
C/C++ Source or Header  |  1995-06-07  |  3KB  |  156 lines

  1. /* HRGTool Librarie Header File */
  2. /* $Id$ */
  3.  
  4. #ifndef HRG_HRGTOOL_H
  5. #define HRG_HRGTOOL_H
  6.  
  7. #ifndef EXEC_TYPES_H
  8. #include <exec/types.h>
  9. #endif
  10.  
  11. #ifndef DOS_DOS_H
  12. #include <dos/dos.h>
  13. #endif
  14.  
  15. #ifndef INTUITION_INTUITION_H
  16. #include <intuition/intuition.h>
  17. #endif
  18.  
  19. #ifndef WORKBENCH_STARTUP_H
  20. #include <workbench/startup.h>
  21. #endif
  22.  
  23. #define ERR_NOMEM -1
  24. #define ERR_FAILED -2
  25.  
  26.  
  27. #define HRCMQ_MAXLEN 3407820
  28.  
  29. #define HREX_ERROR    -1
  30. #define HREX_ISFILE    1
  31. #define HREX_ISDIR    2
  32. #define HREX_NOTFOUND 0
  33.  
  34. #define hrDeleteExtNode(mp,nd) hrFreeVecPart(mp,nd)
  35.  
  36. /* Definition fuer die DoWildHook Daten */
  37.  
  38. #define DOWILD_CONTINUE 0    /* Kein Fehler, naechstes File suchen */
  39. #define DOWILD_STOPDIR  1    /* Dieses Dir abbrechen */
  40. #define DOWILD_BREAK        2    /* Alles abbrechen    */
  41.  
  42. /* Definition fuer das (simple) Buffered FileIO */
  43.  
  44. struct HRBFile
  45. {
  46.     BPTR    file;
  47.     UBYTE *buffer;
  48.     ULONG buffsize;
  49.     ULONG index;
  50.     ULONG count;
  51.     WORD    ungetchar;
  52. };
  53.  
  54. #define HRBMODE_READ    1    /* Mehr gibt es noch nicht ;) */
  55.  
  56. /* Definition fuer hrOpenTimer()/hrCloseTimer() */
  57.  
  58. struct HRTimer
  59. {
  60.     struct timerequest *TimerIO;
  61.     struct MsgPort *TimerMP;
  62.     struct Message *TimerMSG;
  63. };
  64.  
  65. /* Definition fuer hrParseToolType()/hrParseWBArgs() */
  66.  
  67. #define    HTAT_END                0
  68. #define    HTAT_NUMBER            1
  69. #define    HTAT_STRING            2
  70. #define    HTAT_SWITCH            3
  71. #define    HTAT_STRARRAY        4
  72.  
  73. struct    HTArgs
  74. {
  75.     ULONG        Type;
  76.     STRPTR    ToolName;
  77.     ULONG        Value;
  78. };
  79.  
  80.  
  81. struct    HRTOLibs
  82. {
  83.     struct    Library **LibBase;    /* Pointer to Var for Library Base */
  84.     STRPTR    LibName;            /* Name of Library */
  85.     ULONG        LibVersion;        /* Minimal VERSION (NULL don't cares) */
  86.     ULONG        LibRevision;    /* Minimal REVISION (NULL don't cares) */
  87.     ULONG        LibFlags;        /* Action on Open/Close of Library */
  88. };
  89.  
  90. #define HROLF_ALERT        1    /* Use Alert to Show Open Error */
  91. #define HROLF_INFORM        2    /* Use Inform Requester to show Open Error */
  92. #define HROLF_SKIP        4    /* Skip the failed Library */
  93. #define HROLF_REQUEST    8    /* Ask User by Requester to find Library */
  94.  
  95.  
  96. /* Interne Strukturen (NON-PUBLIC) */
  97.  
  98. struct WndLock
  99. {
  100.     ULONG NestCount;
  101.     struct Requester req;
  102. };
  103.  
  104. struct HRResList
  105. {
  106.     struct Library **Libs;
  107.     struct ResMPNode *First;
  108. };
  109.  
  110. struct ResMPNode
  111. {
  112.     struct ResMPNode *Succ;
  113.     struct ResMPNode *Pred;
  114.     struct MemoryPool *mp;
  115. };
  116.  
  117. struct MemBlock
  118. {
  119.     struct MemBlock *Succ;
  120.     struct MemBlock *Pred;
  121.     ULONG  MemType;
  122.     ULONG  BytesUsed;
  123. };
  124.  
  125. struct MemPart
  126. {
  127.     struct MemPart *Succ;
  128.     struct MemPart *Pred;
  129.     struct MemBlock *Block;
  130.     ULONG  Size;
  131. };
  132.  
  133. struct BlockList
  134. {
  135.     struct MemBlock *Head;
  136.     struct MemBlock *Tail;
  137.     struct MemBlock *TailPred;
  138. };
  139.  
  140. struct PartList
  141. {
  142.     struct MemPart *Head;
  143.     struct MemPart *Tail;
  144.     struct MemPart *TailPred;
  145. };
  146.  
  147. struct MemoryPool
  148. {
  149.     struct BlockList Blocks;
  150.     struct PartList  Parts;
  151.     ULONG  BlockSize;
  152. };
  153.  
  154. #endif
  155.  
  156.